package com.amading.repository;

import com.amading.entity.ImMessage;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ImMessageRepository extends JpaRepository<ImMessage,String> {
    Long countByIsReadAndSourceAndOrderId(Integer isRead,Integer source,String  orderId);

    List<ImMessage> findImMessagesByOrderIdOrderBySendTimeAsc(String orderId);

    ImMessage findFirstByIdMessage(String idMessage);
}
